import {replace, replaceName, replaceNameWithParam} from '../../router/util'

export let routerByTargetPath = function (targetPath) {
  if (targetPath === 'index') {
    return replace(`/home-m/index`)
  } else {
    return replaceName(targetPath)
  }
};
export let routerByTargetPath2 = function (targetPath) {
  if (targetPath === 'index') {
    return replace(`/home-m/index`)
  } else {
    let path = targetPath.split("_").join("/");
    return replaceNameWithParam(path)
  }
};
